function singlewave_gpu(file, seconds)
    if nargin < 2, seconds = 0; end
    if seconds == 0
        [y, Fs] = wavread(file);      % data= y, sampling freq = Fs
    else
        [y, Fs] = wavread(file,[1 44100*seconds]);      % data= y, sampling freq = Fs
    end
    player = audioplayer(y,Fs);
    
    t = (1:length(y))/Fs;
    t = gsingle(t);
    y = gsingle(y);
    gfigure;
    
    timeSkip = 1000/44100; %how many samples to skip ahead with.
    
    lenY = length(y);
    myt = tic;
    numSeconds = 0;
    a= size(y);
    lengthSong = a(1)/Fs;
    play(player);
    while numSeconds<lengthSong
        tic;
        numSeconds = toc(myt);
        
        indnew = [ceil((numSeconds-timeSkip)*44100) ceil((numSeconds+timeSkip)*44100)];
        
        if (indnew(1) <= 0)
            indnew(1) = 1;
        end
        if (indnew(2) >= lenY)
            indnew(2)= lenY;
        end
        ind = [indnew(1):indnew(end)];
        if length(ind) == 0
            break;
        end
        upperlimit = gones(ind(end)-ind(1), 1)*.9;
        plot(upperlimit);
        ghold_on
        plot(upperlimit*-1); %lower limit
        
        plot(y(ind)) %plotting the data
        ghold_off;
        toc
        pause(.01);
        
    end
    
    
    
    
